/*
 * CopyRight(C) Kenbin
 */

#ifndef LWS_UTILS_INCLUDED
#define LWS_UTILS_INCLUDED

#include <string>
#include <vector>

using namespace std;

namespace LWS {
    int GB2312HanziIndex(string &str);
    bool IsGB2312Hanzi(string &str);
    bool IsGB2312HanziS(string &str);

    string NextCHAR(const string &str, int cur_pos);
    int CHARCount(const string &str);

    void Parse(const string &str, vector<string> &items, const char separator = ' ');
    void Parse(const string &str, pair<string,string> &item, const char separator = '/');
    void Parse(const string &str, vector<pair<string,string> > &items);
};

#endif
